package com.bat.conf.datasource;

import lombok.Data;

import static java.util.concurrent.TimeUnit.MINUTES;

/**
 * @Description: 数据源配置
 * @Author: zpf
 * @Date: 2020/1/16 下午8:24
 */
@Data
public class HikariConfig {
    private static final long CONNECTION_TIMEOUT = MINUTES.toMillis(30);
    private static final long VALIDATION_TIMEOUT = MINUTES.toMillis(5);
    private static final long IDLE_TIMEOUT = MINUTES.toMillis(10);
    private static final long MAX_LIFETIME = MINUTES.toMillis(30);
    private static final int DEFAULT_POOL_SIZE = 10;

    private boolean unitTest = false;

    private long connectionTimeout;
    private long validationTimeout;
    private long idleTimeout;
    private long leakDetectionThreshold;
    private long maxLifetime;
    private int maxPoolSize;
    private int minIdle;
    private String poolName;

}
